<?php
namespace app\pxs\model;

use think\Model;

class UrlStaffUser extends Model
{
    protected $autoWriteTimestamp = true;

    public static function saveUrl($user,$staff,$url)
    {
        $url = UrlStaffUser::where("user_no",$user)
//            ->where("staff_no",$staff)
            ->where("url",$url)->find();
        if(!$url){
            UrlStaffUser::create(["user_no"=>$user,"staff_no"=>$staff,"url"=>$url]);
        }else{
//            $url
        }

    }
}